package com.excel.data;

import com.google.common.collect.Sets;
import org.apache.commons.collections4.CollectionUtils;

import java.util.Set;

/**
 * @author yutao
 * @since 2020/4/29 6:13 下午
 */
public class CheckExcelDTO {

    private Integer sheetId;
    private Integer rowId;
    private Set<Integer> errorCellIds = Sets.newHashSet();
    private String errorMessage;

    public Boolean isHappenedError() {
        return CollectionUtils.isNotEmpty(errorCellIds);
    }

    public Integer getSheetId() {
        return sheetId;
    }

    public void setSheetId(Integer sheetId) {
        this.sheetId = sheetId;
    }

    public Integer getRowId() {
        return rowId;
    }

    public void setRowId(Integer rowId) {
        this.rowId = rowId;
    }

    public Set<Integer> getErrorCellIds() {
        return errorCellIds;
    }

    public void setErrorCellIds(Set<Integer> errorCellIds) {
        this.errorCellIds = errorCellIds;
    }

    public String getErrorMessage() {
        return errorMessage;
    }

    public void setErrorMessage(String errorMessage) {
        this.errorMessage = errorMessage;
    }
}
